export default {
  data() {
    return {
      countdown: 15,
      allGameTime: 300,
      loopId: null,
      isAnswered: false
    }
  },
  methods: {
    startCountdown() {
      this.loopId = setInterval(() => {
        if (this.countdown > 0) {
          this.countdown--
        } else {
          this.stopLoop()
        }
      }, 1000)
    },
    stopLoop() {
      clearInterval(this.loopId)
      // 处理倒计时结束后的逻辑
    }
  }
}